This invention relates to a database control method for managing data of an information system, and more particularly, to a technology of exclusive control of a database.
ACID characteristics (atomicity, consistency, isolation, and durability) are basic characteristics when transactions are processed on the database. The atomicity and the durability are realized by writing a data update record (log) in a storage system. In other words, depending on whether a log of transaction completion has been written in the storage system, completion of a transaction is uniquely decided (atomicity). For the transaction whose log has been written in the storage system, its result is made durable (durability). The isolation is realized by exclusive control of data (lock). In other words, a preceding transaction locks data to limit operations of other transactions for the data, whereby isolation of the transaction is realized.
The database which includes a log output module and an exclusive control module operates as follows. An instruction of a data operation is transmitted from an operation terminal to the database. In the case of a relational database, a data operation is generally instructed by using a SQL sentence. The database operates the data based on the instruction from the operation terminal to give a response to the operation terminal. In this case, the database carries out exclusive control of data to limit data operations of other transactions. When finishing the transaction, the operation terminal transmits a transaction finish instruction (commit instruction) to the database. The database writes logs of the data operation and transaction completion in the storage system. Upon completion of writing of the logs in the storage system, the database releases the data lock, and notifies the transaction completion to the operation terminal.
In place of the locking technology, a multi version concurrency control (MVCC) technology may be used. According to the MVCC technology, data before updating is saved in a saving area when data is updated. Subsequent transactions are carried out by using the data of the saving area. By using the MVCC technology, exclusive waiting time of the subsequent transactions is shortened, and execution parallelism of the transactions is improved.
In the case of a database used for remotely backing-up data using remote copying of a storage system, a log is transferred to a remote site, which leads to a problem of long log output time. Thus, a multiple log transfer technology of preparing a plurality of log buffers in the database and sequentially outputting contents of the log buffers to a storage system is used. By using the multiple log transfer technology, log output efficiency can be increased.
The log output module of the database is described in JP 2006-323826 A. The locking module of the database is described in JP 2004-334460 A. The MVCC technology is described in JP 2003-140951 A. The remote backing-up of data using the remote copying of the storage system is described in JP 2006-48103 A.